//
//  CustomField.h
//  策略模式
//
//  Created by YuanJiang on 2019/9/5.
//  Copyright © 2019 llbt. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "InputValidator.h"
NS_ASSUME_NONNULL_BEGIN

/**
 UITextField 的一个子类
 
 */
@interface CustomField : UITextField

//抽象的策略
@property(nonatomic,strong) InputValidator *validator;

//初始化
-(instancetype) initWithFrame:(CGRect)frame;

//验证输入合法性
-(BOOL)validate;

@end

NS_ASSUME_NONNULL_END
